﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class TipPanel : BasePanel
{
	Text text;
	Button okBtn;

	public override void OnInit()
	{
		//base.OnInit();
		skinPath = "TipPanel";
		type = PanelManager.PanelType.Tip;
	}

	public override void OnShow(params object[] para)
	{
		//base.OnShow(para);
		Transform bgImg = skin.transform.Find("BgImg");
		text = bgImg.Find("ContentText").GetComponent<Text>();
		okBtn = bgImg.Find("OKBtn").GetComponent<Button>();
		okBtn.onClick.AddListener(() => Close());

		if (para.Length == 1)
		{
			text.text = (string)para[0];
		}
	}

	public override void OnClose()
	{
		//base.OnClose();
	}
}